
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

public class exam_03 {
    public static void main(String[] args) {
        try {
            URL url = new URL("http://hq.sinajs.cn/list=sz300170");
            try {
                URLConnection uc = url.openConnection();
                InputStreamReader bi = new InputStreamReader(uc.getInputStream());
                BufferedReader br = new BufferedReader(bi);
                String line;
                String[] strArr = new String[100];
                while ((line = br.readLine())!=null) {
                    System.out.println(line);
                    strArr=line.split(",");
                }

            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }
}
